Year 8 CompSci: The Basics

Your beginner-friendly guide to understanding how computers actually work!

Module 1: The Physical World vs. The Digital World

Hardware vs. Software

Hardware is anything you can physically touch or drop on the floor (like a keyboard, a monitor, or a microchip). Software is the invisible set of instructions and programs that tell the hardware what to do (like a video game, a web browser, or an operating system).

The IPO Cycle

Every single computer system in the world follows the Input → Process → Output cycle.

Real-World Example: A Supermarket Automatic Door
Input: A motion sensor detects a person walking up.
Process: The computer checks the sensor data and says, "If motion = true, then activate the motors."
Output: The motor receives a signal and physically pulls the sliding doors open.

Can a device be both Input and Output? Yes! Think of a tablet's touchscreen. It acts as an output by displaying an image to you, but when you tap it, it acts as an input by sensing your finger!

Module 2: Speaking the Computer's Language

Why Binary?

Computers don't have human brains. They are built of billions of tiny electrical switches. A switch can only be ON (1) or OFF (0). Therefore, computers must use the Base-2 Binary system instead of our human Base-10 (decimal) system.

How to read Binary:
Imagine columns that double in value starting from the right. Let's look at the binary number 1001.
8421
1001
Just add the columns that have a '1' turned on. 8 + 1 = 9.

ASCII: The Digital Dictionary

Because computers only understand numbers, we had to invent a dictionary to translate numbers into text. ASCII is a famous standard for this. In ASCII, every letter, space, and symbol is assigned a specific decimal number.

For example, capital 'A' is 65. Because computers treat capital and lowercase letters as completely different characters, lowercase 'a' is 97! This is why passwords are case-sensitive. To find 'C', you just count up: A=65, B=66, C=67.

Module 3: Drawing with Pixels

A bitmap is an image made up of a grid of tiny colored dots called pixels. To store an image, the computer saves the binary color code for every single pixel from left to right, top to bottom.

Colour Depth

Colour Depth means how many binary bits are used for a single pixel.

To tell the computer which binary code equals which colour, the file includes a Lookup Table (e.g., "00 = Red", "11 = Black").

Calculating Image File Size
Formula: Width × Height × Colour Depth = Total Bits.
If an image is 4 pixels wide and 4 pixels high, using 1-bit colour:
4 × 4 × 1 = 16 bits.
(To turn bits into Bytes, just divide your final answer by 8!)

Metadata: This is "data about data." If a computer just receives raw binary 1s and 0s, it won't know if it's looking at text, an image, or a song! Metadata is attached to the file to tell the computer the image's height, width, and lookup table.

Module 4: Algorithms & Logic

An algorithm is a precise, step-by-step set of instructions designed to solve a problem. Think of it like a recipe. Precision is highly important because computers take things literally. If you mess up the sequence (the order of steps), the program will fail!

Searching for Data

The Bubble Sort

A simple algorithm to sort numbers. The computer looks at two adjacent items at the exact same time. If the left item is bigger than the right item, they swap! It keeps doing this until it reaches the end of the list (this is called one "pass"). After the very first pass, the largest number in the list is absolutely guaranteed to be pushed to the very end!

The Tower of Hanoi Pattern

Computer science is all about finding mathematical patterns! In the Tower of Hanoi puzzle, the minimum moves always follow a mathematical rule based on the number of disks. If 3 disks take 7 moves, and 4 disks take 15 moves... can you spot the doubling pattern to figure out what 5 disks will take?